package com.lixinlei.springboot_servlet.controller.requestmapping.path;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(path = "/request/mapping/path")
public class PathController {

    @RequestMapping(path = {"/multi/match1", "/multi/match2"})
    public String multiMatch() {
        System.out.println("***************Multi-Match");
        return "Multi-Match";
    }

    @RequestMapping(path = "${pathABC}")
    public String pathABC() {
        System.out.println("*********************pathABC()");
        return "pathABC";
    }

    /**
     * spring.mvc.pathmatch.useSuffixPattern=true
     * @return
     */
    @RequestMapping(path = "/pathMatchUseSuffixPattern")
    public String pathMatchUseSuffixPattern() {
        System.out.println("*********************pathMatchUseSuffixPattern()");
        return "pathMatchUseSuffixPattern()";
    }

    @RequestMapping
    public String missingMethodPath() {
        System.out.println("*********************missingMethodPath()");
        return "missingMethodPath()";
    }

}
